<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        .container,
        h1 {
            background: url("https://storage.360buyimg.com/joyday/static/1981FF.png");
            background-size: 100% 100%;
        }
        
        .container h1,
        .container::after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        .container {
            position: relative;
            width: 100%;
            height: 100vh;
        }
        
        .container::after {
            content: "";
            background: rgba(0, 0, 0, 0.8);
        }
        
        h1 {
            z-index: 2;
            -webkit-text-fill-color: transparent;
            -webkit-background-clip: text;
        }
        .borderClass{
            box-sizing: border-box;
            width: 200px;
            height: 200px;
            border: 10px solid red;
            padding: 10px;
        }
    </style>
</head>

<body>
    <!-- <div class="container">
        <h1>I ❤ CSS</h1>
    </div> -->

    <div class="borderClass">

    </div>
</body>

</html>